<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: include/designM/eventDetail/dispatcher.hpp 源文件</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_7815f4a69fa470e020068bb120d080ef.html">designM</a></li><li class="navelem"><a class="el" href="../../dir_89b7e66325e32f9c7286ce40b9e58f89.html">eventDetail</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">dispatcher.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../da/d26/dispatcher_8hpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &lt;condition_variable&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &lt;queue&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &lt;chrono&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="../../da/d26/dispatcher_8hpp.html#a60946d8f2a67e4b7e402864207ac535e">   14</a></span><span class="preprocessor">#define CMD_USE_SINGLETON   (1)</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#include &lt;mutex&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#if CMD_USE_SINGLETON</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#    include &quot;<a class="code" href="../../de/d6d/singleton_8hpp.html">designM/singleton.hpp</a>&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &quot;<a class="code" href="../../d2/d62/strategy_8hpp.html">designM/strategy.hpp</a>&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &quot;<a class="code" href="../../d9/d7a/variant_8hpp.html">container/variant.hpp</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#include &quot;<a class="code" href="../../d2/d81/design_m_2event_detail_2event_8hpp.html">event.hpp</a>&quot;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../df/d8d/namespacewheels.html">wheels</a></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span>{</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span>    <span class="keyword">namespace </span>dm</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>    {</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span>        <span class="keyword">template</span>&lt; <span class="keyword">typename</span> cmdType &gt;</div>
<div class="foldopen" id="foldopen00029" data-start="{" data-end="};">
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html">   29</a></span>        <span class="keyword">class </span><a class="code hl_class" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html">dispatcher</a></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>#if <a class="code hl_define" href="../../da/d26/dispatcher_8hpp.html#a60946d8f2a67e4b7e402864207ac535e">CMD_USE_SINGLETON</a></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>            : <span class="keyword">public</span> <a class="code hl_class" href="../../de/d44/classwheels_1_1dm_1_1singleton.html">singleton</a>&lt; dispatcher&lt;cmdType&gt; &gt;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>        {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>        <span class="keyword">public</span>:</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aff9890b6c334da4a5ab289b54d04effe">   35</a></span>            <span class="keyword">using </span><a class="code hl_typedef" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aff9890b6c334da4a5ab289b54d04effe">evt_func_type</a> = void(<span class="keyword">const</span> <a class="code hl_class" href="../../dd/d54/classwheels_1_1variant.html">variant</a>&amp; );</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a849ee1073e0775b46829e60be7c571d2">   36</a></span>            <span class="keyword">using </span><a class="code hl_typedef" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a849ee1073e0775b46829e60be7c571d2">evt_func_type_p</a> = <a class="code hl_typedef" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aff9890b6c334da4a5ab289b54d04effe">evt_func_type</a> *;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>            </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a9d72c877e5f4db7eca5aeef401057817">   38</a></span>            <span class="keyword">using </span><a class="code hl_typedef" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a9d72c877e5f4db7eca5aeef401057817">clock</a> = std::chrono::high_resolution_clock;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a2230dc69f54ce004ee50a6b654fd05f3">   39</a></span>            <span class="keyword">using </span><a class="code hl_typedef" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a2230dc69f54ce004ee50a6b654fd05f3">timepoint</a> = std::chrono::time_point&lt; clock &gt;;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span>            </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ae5e7911fea7f6844d6020b2458e1e56a">   41</a></span>            <span class="keyword">using </span><a class="code hl_typedef" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ae5e7911fea7f6844d6020b2458e1e56a">eventQueue</a> = std::queue&lt; variant &gt;;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aca35fe795abb30cb3e4620616161e93b">   43</a></span>            <span class="keyword">using </span><a class="code hl_class" href="../../d0/db2/structwheels_1_1dm_1_1strategy.html">strategy</a> = <a class="code hl_struct" href="../../d0/db2/structwheels_1_1dm_1_1strategy.html">wheels::dm::strategy&lt; cmdType , evt_func_type &gt;</a>;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>        <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>            <span class="comment">// 消息队列</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">   46</a></span>            <a class="code hl_typedef" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ae5e7911fea7f6844d6020b2458e1e56a">eventQueue</a>                   <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">m_store__</a>;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>            <span class="comment">// 策略模式实现一个函数映射表</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ac08667c44115b70461036fea89f28deb">   48</a></span>            <a class="code hl_class" href="../../d0/db2/structwheels_1_1dm_1_1strategy.html">strategy</a>                     <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ac08667c44115b70461036fea89f28deb">m_func_map__</a>;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>            <span class="comment">// 数据互斥</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">   50</a></span>            std::mutex                   <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">m_mutex__</a>;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>            <span class="comment">// 线程控制互斥对象</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a99e075b7157efa6df80f5b2aa283a027">   52</a></span>            std::mutex                   <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a99e075b7157efa6df80f5b2aa283a027">m_inform_mutex__</a>;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>            <span class="comment">// 条件变量</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a6cbb32b38bcff81f305f38cd6ad2b00d">   54</a></span>            std::condition_variable      <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a6cbb32b38bcff81f305f38cd6ad2b00d">m_notify__</a>;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>        <span class="keyword">public</span>:</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a51a68f07073de31a7cf3babbb286ca8a">   59</a></span>            <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a51a68f07073de31a7cf3babbb286ca8a">dispatcher</a>(): <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">m_store__</a>(){}</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>            </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a3f72ad2117968ff5649900aef79b5c7f">   61</a></span>            <span class="keyword">virtual</span> <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a3f72ad2117968ff5649900aef79b5c7f">~dispatcher</a>(){  <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ab11e58904c1f3d5b6cabe770a1032982">clear</a>(); }</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>            <span class="keyword">template</span>&lt; <span class="keyword">typename</span> dataType &gt;</div>
<div class="foldopen" id="foldopen00071" data-start="{" data-end="}">
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#af6f97476a2c006c6f471327d350112ff">   71</a></span>            <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#af6f97476a2c006c6f471327d350112ff">send</a>( <span class="keyword">const</span> cmdType&amp; cmd , dataType&amp;&amp; data , <span class="keywordtype">bool</span> notify = <span class="keyword">true</span> ){</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span>                <a class="code hl_struct" href="../../d6/d04/structwheels_1_1dm_1_1event_data.html">eventData&lt; cmdType &gt;</a>  evt_data( cmd , data );</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>                <a class="code hl_class" href="../../dd/d54/classwheels_1_1variant.html">wheels::variant</a> param = <a class="code hl_function" href="../../dd/d54/classwheels_1_1variant.html#aec8c6372866cf7fd422a96e1164aa5c3">wheels::variant::make</a>( evt_data );</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>                {</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>                    std::lock_guard&lt; std::mutex &gt; locker(<a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">m_mutex__</a>);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>                    <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">m_store__</a>.push( param );</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>                }</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>                <span class="keywordflow">if</span>( notify ){</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>                    <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a6cbb32b38bcff81f305f38cd6ad2b00d">m_notify__</a>.notify_one();</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>                }</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>            }</div>
</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>            </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>            <span class="keyword">template</span>&lt; <span class="keyword">typename</span> dataType &gt;</div>
<div class="foldopen" id="foldopen00084" data-start="{" data-end="}">
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aaab8d07e37bcb87ae820a20f7a0ab855">   84</a></span>            <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aaab8d07e37bcb87ae820a20f7a0ab855">emit</a>( <span class="keyword">const</span> cmdType&amp; cmd , dataType&amp;&amp; data , <span class="keywordtype">bool</span> notify = <span class="keyword">true</span> ){</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>                <a class="code hl_struct" href="../../d6/d04/structwheels_1_1dm_1_1event_data.html">eventData&lt; cmdType &gt;</a>  evt_data( cmd , data );</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>                <a class="code hl_class" href="../../dd/d54/classwheels_1_1variant.html">wheels::variant</a> param = <a class="code hl_function" href="../../dd/d54/classwheels_1_1variant.html#aec8c6372866cf7fd422a96e1164aa5c3">wheels::variant::make</a>( evt_data );</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>                {</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>                    std::lock_guard&lt; std::mutex &gt; locker(<a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">m_mutex__</a>);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>                    <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">m_store__</a>.push( param );</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>                }</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>                <span class="keywordflow">if</span>( notify ){</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>                    <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a6cbb32b38bcff81f305f38cd6ad2b00d">m_notify__</a>.notify_one();</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>                }</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>            }</div>
</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aa428adebc353596f03cb750e49c62657">   96</a></span>            <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aa428adebc353596f03cb750e49c62657">update</a>(){  <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a6cbb32b38bcff81f305f38cd6ad2b00d">m_notify__</a>.notify_one(); }</div>
<div class="foldopen" id="foldopen00100" data-start="{" data-end="}">
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ab11e58904c1f3d5b6cabe770a1032982">  100</a></span>            <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ab11e58904c1f3d5b6cabe770a1032982">clear</a>(){</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>                std::lock_guard&lt; std::mutex &gt; lok( <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">m_mutex__</a> );</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>                <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ac08667c44115b70461036fea89f28deb">m_func_map__</a>.clear();</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>                <span class="keywordflow">while</span>( !<a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">m_store__</a>.empty() ){</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>                    <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">m_store__</a>.pop();</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>                }</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>                <span class="comment">// 清理掉所有数据后通知dispatch，结束dispath的等待操作</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>                <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a6cbb32b38bcff81f305f38cd6ad2b00d">m_notify__</a>.notify_all();</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>            }</div>
</div>
<div class="foldopen" id="foldopen00114" data-start="{" data-end="}">
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#accec6f12134ea9831ced6979d7b7c299">  114</a></span>            <span class="keywordtype">bool</span> <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#accec6f12134ea9831ced6979d7b7c299">connect</a>( <span class="keyword">const</span> cmdType&amp; cmd , std::function&lt; evt_func_type&gt; func ){</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>                std::lock_guard&lt; std::mutex &gt; lok( <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">m_mutex__</a> );</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>                <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ac08667c44115b70461036fea89f28deb">m_func_map__</a>.add( cmd , func );</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>            }</div>
</div>
<div class="foldopen" id="foldopen00123" data-start="{" data-end="}">
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aaa833694843552ba8f2e1f0361840553">  123</a></span>            <span class="keywordtype">bool</span> <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aaa833694843552ba8f2e1f0361840553">connect</a>( <span class="keyword">const</span> cmdType&amp; cmd , <a class="code hl_typedef" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a849ee1073e0775b46829e60be7c571d2">evt_func_type_p</a> func ){</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>                std::lock_guard&lt; std::mutex &gt; lok( <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">m_mutex__</a> );</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>                <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ac08667c44115b70461036fea89f28deb">m_func_map__</a>.add( cmd , std::bind( func , std::placeholders::_1 ) );</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>            }</div>
</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>            <span class="keyword">template</span>&lt;<span class="keyword">typename</span> <span class="keyword">class</span>Type , <span class="keyword">typename</span> funcType &gt;</div>
<div class="foldopen" id="foldopen00137" data-start="{" data-end="}">
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a355a328854756ec29453f92d115784ba">  137</a></span>            <span class="keywordtype">bool</span> <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a355a328854756ec29453f92d115784ba">connect</a>( <span class="keyword">const</span> cmdType&amp; cmd , funcType classType::* func , classType * obj ){</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>                std::lock_guard&lt; std::mutex &gt; lok( <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">m_mutex__</a> );</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>                <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ac08667c44115b70461036fea89f28deb">m_func_map__</a>.add( cmd , std::bind( func , obj ) );</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>            }</div>
</div>
<div class="foldopen" id="foldopen00147" data-start="{" data-end="}">
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"><a class="line" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#abf5a396e85ef1065c608d3621292a1e4">  147</a></span>            <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#abf5a396e85ef1065c608d3621292a1e4">dispatch</a>( <span class="keywordtype">long</span> ovtime ){</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>                <span class="keywordflow">if</span>( <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">m_store__</a>.size() &gt; 0 ){</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>                    <a class="code hl_class" href="../../dd/d54/classwheels_1_1variant.html">variant</a> item;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>                    {</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>                        std::lock_guard&lt; std::mutex &gt; lock(<a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">m_mutex__</a>);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span>                        item = <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">m_store__</a>.front();</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span>                        <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">m_store__</a>.pop();</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>                    }</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>                    <span class="keyword">auto</span> evt_data = item.<a class="code hl_function" href="../../dd/d54/classwheels_1_1variant.html#aced76c3bf530e5ea5aa73c0b04b1094a">get</a>&lt; <a class="code hl_struct" href="../../d6/d04/structwheels_1_1dm_1_1event_data.html">eventData&lt;cmdType&gt;</a> &gt;();</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>                    <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ac08667c44115b70461036fea89f28deb">m_func_map__</a>.call( evt_data.m_id__ , evt_data.m_data__ );</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>                }<span class="keywordflow">else</span>{  <span class="comment">// 如果消息队列中没有数据，则阻塞线程等待新的消息</span></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>                    <span class="comment">// 这里要注意如果在销毁的时候或者清理数据内容的时候需要防止</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>                    <span class="comment">// dispatch无法退出的情况</span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>                    std::unique_lock&lt;std::mutex&gt; lok( <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a99e075b7157efa6df80f5b2aa283a027">m_inform_mutex__</a> );</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>                    <a class="code hl_typedef" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a2230dc69f54ce004ee50a6b654fd05f3">timepoint</a> tp{ std::chrono::milliseconds( ovtime ) };</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>                    <a class="code hl_variable" href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a6cbb32b38bcff81f305f38cd6ad2b00d">m_notify__</a>.wait_until( lok , tp );</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>                }</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>            }</div>
</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>        };</div>
</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span> </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span>    }</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span>}</div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html">wheels::dm::dispatcher</a></div><div class="ttdef"><b>定义</b> <a href="#l00029">dispatcher.hpp:33</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a1c16070f72eb8f2e48e2278efff03b30"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a1c16070f72eb8f2e48e2278efff03b30">wheels::dm::dispatcher::m_mutex__</a></div><div class="ttdeci">std::mutex m_mutex__</div><div class="ttdef"><b>定义</b> <a href="#l00050">dispatcher.hpp:50</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a2230dc69f54ce004ee50a6b654fd05f3"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a2230dc69f54ce004ee50a6b654fd05f3">wheels::dm::dispatcher::timepoint</a></div><div class="ttdeci">std::chrono::time_point&lt; clock &gt; timepoint</div><div class="ttdef"><b>定义</b> <a href="#l00039">dispatcher.hpp:39</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a23e15a7f9dbdac00349ef34d3b383a69"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a23e15a7f9dbdac00349ef34d3b383a69">wheels::dm::dispatcher::m_store__</a></div><div class="ttdeci">eventQueue m_store__</div><div class="ttdef"><b>定义</b> <a href="#l00046">dispatcher.hpp:46</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a355a328854756ec29453f92d115784ba"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a355a328854756ec29453f92d115784ba">wheels::dm::dispatcher::connect</a></div><div class="ttdeci">bool connect(const cmdType &amp;cmd, funcType classType::*func, classType *obj)</div><div class="ttdoc">命令绑定，这个函数用来绑定类成员函数</div><div class="ttdef"><b>定义</b> <a href="#l00137">dispatcher.hpp:137</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a3f72ad2117968ff5649900aef79b5c7f"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a3f72ad2117968ff5649900aef79b5c7f">wheels::dm::dispatcher::~dispatcher</a></div><div class="ttdeci">virtual ~dispatcher()</div><div class="ttdef"><b>定义</b> <a href="#l00061">dispatcher.hpp:61</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a51a68f07073de31a7cf3babbb286ca8a"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a51a68f07073de31a7cf3babbb286ca8a">wheels::dm::dispatcher::dispatcher</a></div><div class="ttdeci">dispatcher()</div><div class="ttdoc">ctor</div><div class="ttdef"><b>定义</b> <a href="#l00059">dispatcher.hpp:59</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a6cbb32b38bcff81f305f38cd6ad2b00d"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a6cbb32b38bcff81f305f38cd6ad2b00d">wheels::dm::dispatcher::m_notify__</a></div><div class="ttdeci">std::condition_variable m_notify__</div><div class="ttdef"><b>定义</b> <a href="#l00054">dispatcher.hpp:54</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a849ee1073e0775b46829e60be7c571d2"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a849ee1073e0775b46829e60be7c571d2">wheels::dm::dispatcher::evt_func_type_p</a></div><div class="ttdeci">evt_func_type * evt_func_type_p</div><div class="ttdef"><b>定义</b> <a href="#l00036">dispatcher.hpp:36</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a99e075b7157efa6df80f5b2aa283a027"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a99e075b7157efa6df80f5b2aa283a027">wheels::dm::dispatcher::m_inform_mutex__</a></div><div class="ttdeci">std::mutex m_inform_mutex__</div><div class="ttdef"><b>定义</b> <a href="#l00052">dispatcher.hpp:52</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_a9d72c877e5f4db7eca5aeef401057817"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#a9d72c877e5f4db7eca5aeef401057817">wheels::dm::dispatcher::clock</a></div><div class="ttdeci">std::chrono::high_resolution_clock clock</div><div class="ttdef"><b>定义</b> <a href="#l00038">dispatcher.hpp:38</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_aa428adebc353596f03cb750e49c62657"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aa428adebc353596f03cb750e49c62657">wheels::dm::dispatcher::update</a></div><div class="ttdeci">void update()</div><div class="ttdef"><b>定义</b> <a href="#l00096">dispatcher.hpp:96</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_aaa833694843552ba8f2e1f0361840553"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aaa833694843552ba8f2e1f0361840553">wheels::dm::dispatcher::connect</a></div><div class="ttdeci">bool connect(const cmdType &amp;cmd, evt_func_type_p func)</div><div class="ttdoc">连接命令和函数指针指向的处理函数</div><div class="ttdef"><b>定义</b> <a href="#l00123">dispatcher.hpp:123</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_aaab8d07e37bcb87ae820a20f7a0ab855"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aaab8d07e37bcb87ae820a20f7a0ab855">wheels::dm::dispatcher::emit</a></div><div class="ttdeci">void emit(const cmdType &amp;cmd, dataType &amp;&amp;data, bool notify=true)</div><div class="ttdef"><b>定义</b> <a href="#l00084">dispatcher.hpp:84</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_ab11e58904c1f3d5b6cabe770a1032982"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ab11e58904c1f3d5b6cabe770a1032982">wheels::dm::dispatcher::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">清理队列，函数映射表</div><div class="ttdef"><b>定义</b> <a href="#l00100">dispatcher.hpp:100</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_abf5a396e85ef1065c608d3621292a1e4"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#abf5a396e85ef1065c608d3621292a1e4">wheels::dm::dispatcher::dispatch</a></div><div class="ttdeci">void dispatch(long ovtime)</div><div class="ttdoc">命令执行调度，执行命令队列的头一个</div><div class="ttdef"><b>定义</b> <a href="#l00147">dispatcher.hpp:147</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_ac08667c44115b70461036fea89f28deb"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ac08667c44115b70461036fea89f28deb">wheels::dm::dispatcher::m_func_map__</a></div><div class="ttdeci">strategy m_func_map__</div><div class="ttdef"><b>定义</b> <a href="#l00048">dispatcher.hpp:48</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_accec6f12134ea9831ced6979d7b7c299"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#accec6f12134ea9831ced6979d7b7c299">wheels::dm::dispatcher::connect</a></div><div class="ttdeci">bool connect(const cmdType &amp;cmd, std::function&lt; evt_func_type &gt; func)</div><div class="ttdoc">连接命令和执行部分</div><div class="ttdef"><b>定义</b> <a href="#l00114">dispatcher.hpp:114</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_ae5e7911fea7f6844d6020b2458e1e56a"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#ae5e7911fea7f6844d6020b2458e1e56a">wheels::dm::dispatcher::eventQueue</a></div><div class="ttdeci">std::queue&lt; variant &gt; eventQueue</div><div class="ttdef"><b>定义</b> <a href="#l00041">dispatcher.hpp:41</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_af6f97476a2c006c6f471327d350112ff"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#af6f97476a2c006c6f471327d350112ff">wheels::dm::dispatcher::send</a></div><div class="ttdeci">void send(const cmdType &amp;cmd, dataType &amp;&amp;data, bool notify=true)</div><div class="ttdoc">发送命令</div><div class="ttdef"><b>定义</b> <a href="#l00071">dispatcher.hpp:71</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1dispatcher_html_aff9890b6c334da4a5ab289b54d04effe"><div class="ttname"><a href="../../dd/d08/classwheels_1_1dm_1_1dispatcher.html#aff9890b6c334da4a5ab289b54d04effe">wheels::dm::dispatcher::evt_func_type</a></div><div class="ttdeci">void(const variant &amp;) evt_func_type</div><div class="ttdef"><b>定义</b> <a href="#l00035">dispatcher.hpp:35</a></div></div>
<div class="ttc" id="aclasswheels_1_1dm_1_1singleton_html"><div class="ttname"><a href="../../de/d44/classwheels_1_1dm_1_1singleton.html">wheels::dm::singleton</a></div><div class="ttdef"><b>定义</b> <a href="../../de/d6d/singleton_8hpp_source.html#l00019">singleton.hpp:20</a></div></div>
<div class="ttc" id="aclasswheels_1_1variant_html"><div class="ttname"><a href="../../dd/d54/classwheels_1_1variant.html">wheels::variant</a></div><div class="ttdoc">实际暴露出来的接口类。这个类具有明确的类型，可以在其他容器中，比如vector中，使用</div><div class="ttdef"><b>定义</b> <a href="../../d9/d7a/variant_8hpp_source.html#l00082">variant.hpp:82</a></div></div>
<div class="ttc" id="aclasswheels_1_1variant_html_aced76c3bf530e5ea5aa73c0b04b1094a"><div class="ttname"><a href="../../dd/d54/classwheels_1_1variant.html#aced76c3bf530e5ea5aa73c0b04b1094a">wheels::variant::get</a></div><div class="ttdeci">dataType get() const</div><div class="ttdef"><b>定义</b> <a href="../../d9/d7a/variant_8hpp_source.html#l00177">variant.hpp:177</a></div></div>
<div class="ttc" id="aclasswheels_1_1variant_html_aec8c6372866cf7fd422a96e1164aa5c3"><div class="ttname"><a href="../../dd/d54/classwheels_1_1variant.html#aec8c6372866cf7fd422a96e1164aa5c3">wheels::variant::make</a></div><div class="ttdeci">static variant make(const dataType &amp;data)</div><div class="ttdoc">构建数据对象</div><div class="ttdef"><b>定义</b> <a href="../../d9/d7a/variant_8hpp_source.html#l00167">variant.hpp:167</a></div></div>
<div class="ttc" id="adesign_m_2event_detail_2event_8hpp_html"><div class="ttname"><a href="../../d2/d81/design_m_2event_detail_2event_8hpp.html">event.hpp</a></div></div>
<div class="ttc" id="adispatcher_8hpp_html_a60946d8f2a67e4b7e402864207ac535e"><div class="ttname"><a href="../../da/d26/dispatcher_8hpp.html#a60946d8f2a67e4b7e402864207ac535e">CMD_USE_SINGLETON</a></div><div class="ttdeci">#define CMD_USE_SINGLETON</div><div class="ttdoc">命令模式命令派发器</div><div class="ttdef"><b>定义</b> <a href="#l00014">dispatcher.hpp:14</a></div></div>
<div class="ttc" id="anamespacewheels_html"><div class="ttname"><a href="../../df/d8d/namespacewheels.html">wheels</a></div><div class="ttdoc">堆栈信息读取和保存记录</div><div class="ttdef"><b>定义</b> <a href="../../d3/df7/ary__str_8hpp_source.html#l00006">ary_str.hpp:7</a></div></div>
<div class="ttc" id="asingleton_8hpp_html"><div class="ttname"><a href="../../de/d6d/singleton_8hpp.html">singleton.hpp</a></div></div>
<div class="ttc" id="astrategy_8hpp_html"><div class="ttname"><a href="../../d2/d62/strategy_8hpp.html">strategy.hpp</a></div></div>
<div class="ttc" id="astructwheels_1_1dm_1_1event_data_html"><div class="ttname"><a href="../../d6/d04/structwheels_1_1dm_1_1event_data.html">wheels::dm::eventData</a></div><div class="ttdef"><b>定义</b> <a href="../../d2/d81/design_m_2event_detail_2event_8hpp_source.html#l00018">event.hpp:18</a></div></div>
<div class="ttc" id="astructwheels_1_1dm_1_1strategy_html"><div class="ttname"><a href="../../d0/db2/structwheels_1_1dm_1_1strategy.html">wheels::dm::strategy&lt; cmdType, evt_func_type &gt;</a></div></div>
<div class="ttc" id="avariant_8hpp_html"><div class="ttname"><a href="../../d9/d7a/variant_8hpp.html">variant.hpp</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
